package com.sl.au.repository;


import com.sl.au.entity.*;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional(readOnly = true)
public interface NoticeRecordRepository extends JpaRepository<NoticeRecord, String>{

    @Query(" select n from NoticeRecord n where  n.contactTime like '%'+?1+'%' or n.contact like '%'+?1+'%' ")
    Page<NoticeRecord> getName(String key, Pageable pageable);
    Page<NoticeRecord> findAll(Pageable pageable);

}
